import Taro from '@tarojs/taro'
import { View,Text} from '@tarojs/components'
import { useEffect,useState } from 'react'
import { showAboutUs } from '../../../api/mode'
import { JumpCard } from '../../../components'
import './index.scss'

export default function AboutUS(){

const [aboutUsInfo,setAboutUsInfo]=useState('')

useEffect(()=>{
  showAboutUs().then(res=>{
    console.log(res.data.data)
    setAboutUsInfo(res.data.data)
  })
})

const jumpto=()=>{
  Taro.redirectTo({
    url: '/mine/pages/cooperativeUnit/cooperativeUnit'//跳转到合作单位
  })
}

  return(
    <View>

      <View className='cjintro'>
      <Text className='cjintro_title'>崇军介绍</Text>
        <View className='cj_content'>  
      {aboutUsInfo}
        </View>

        <View className='aboutUsJumpCard'>
        <JumpCard  context='合作单位' handleClick={jumpto} />
        </View>
      </View>

    </View>
  )
}